package com.kordar.admin.modular.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kordar.admin.modular.sys.entity.AdminEntity;
import com.kordar.admin.modular.sys.entity.TenantEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface TenantMapper extends BaseMapper<TenantEntity> {
    /**
     * 是否存在表
     * @param tableName
     * @return
     */
    int existTable(@Param("tableName")String tableName);
    /**
     * 删除表
     * @param tenantCode
     * @return
     */
    int dropTable(@Param("tenantCode") String tenantCode);
    /**
     * 初始化系统表
     * @param tenantCode
     * @return
     */
    int initTable(@Param("tenantCode") String tenantCode, @Param("admin")AdminEntity adminEntity);
}
